{% extends "pc.master.default.html" %}


{% block script %}
$(document).ready(function(){
	
	if($("#id_username").val().length > 0){
		$("#id_password").focus();
	}else{
		$("#id_username").focus();
	}
});
{% endblock %}



{% block body %}
	<h1>User Login</h1>
	{% if form.errors %}
	<p style="color:red;">ID and password are incorrect. Please try again.</p>
	{% endif %}


	<form method="post" action=".">{% csrf_token %}
	
	{{msg}}
		<p><label for="id_username">ID :</label>
		{{form.username}}</p>
		<p><label for="id_password">Password :</label>
		{{form.password}}</p>
		<input type="hidden" name="redirect_to" value="{{redirect_to}}" />
		
		<input type="submit" value="Login" />
		


	</form>
{% endblock %}
